package Java9_2.Test_1;

import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) {
        while (true) {
            Scanner in = new Scanner(System.in);
            System.out.println("请选择");
            System.out.println("1：登录，2：注册 3：联系客服");
            try {
                int a = in.nextInt();
                switch (a) {
                    case 1:
                        System.out.println("登录成功");
                        break;
                    case 2:
                        System.out.println("注册成功");
                        break;
                    case 3:
                        System.out.println("联系客服");
                        break;

                        default:
                            System.out.println("输入错误");
                            break;
                }
            }catch (Exception e){
                System.out.println("输入错误，请重新输入");
                e.printStackTrace();
            }finally {
                System.out.println("选择结束");
            }
        }
    }
}
